﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Script.Serialization;
namespace EasyLib.Extensions
{
    /// <summary>
    /// 对 System.Object的扩展
    /// </summary>
    public static class ObjectExtension
    {
        public static bool IsNull<T>(this T obj) where T : class
        {
            return obj == null;
        }
        public static string JSONSerialize(this object obj)
        {
            var jss = new JavaScriptSerializer();
            return jss.Serialize(obj);
        }

        public static string TemplateFormat()
        {
            throw new System.NotImplementedException();
        }
    }
}
